package com.ruoyi.project.knowledge.mapper;

import com.ruoyi.project.knowledge.domain.KnowledgeBase;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface KnowledgeBaseMapper {
    /**
     * 查询知识库
     * @param knowledge
     * @return
     */
    List<KnowledgeBase> selectKnowledgeList(KnowledgeBase knowledge);

    List<KnowledgeBase> searchKnowledgeList(@Param("searchValue") String searchValue);

    /**
     * 查询知识库明细
     * @param id
     * @return
     */
    KnowledgeBase selectKnowledgeById(@Param("id") String id);

    /**
     * 检测是否已存在相同标题的知识库
     * @param tite
     * @return
     */
    int checkKnowledgeExist(KnowledgeBase knowledge);

    /**
     * 新增知识库
     * @param knowledge
     * @return
     */
    int insertKnowledge(KnowledgeBase knowledge);

    /**
     * 修改知识库
     * @param knowledge
     * @return
     */
    int updateKnowledge(KnowledgeBase knowledge);

    /**
     * 删除知识库
     * @param id
     * @return
     */
    int deleteKnowledge(@Param("id") String id);
}
